package com.stylefeng.guns.modular.wz.warpper;

import com.stylefeng.guns.common.constant.Consts;
import com.stylefeng.guns.common.constant.factory.ConstantFactory;
import com.stylefeng.guns.core.base.warpper.BaseControllerWarpper;

import java.util.List;
import java.util.Map;

/**
 * 广告管理的包装类
 *
 * @author ruiyifeng
 * @date 2018年3月20日
 */
public class WzAdvWarpper extends BaseControllerWarpper {

    public WzAdvWarpper(List<Map<String, Object>> list) {
        super(list);
    }

    //广告发布类型
    @Override
    public void warpTheMap(Map<String, Object> map) {
        map.put("type", ConstantFactory.me().getDictsByName("广告类型", Integer.parseInt(map.get("type").toString())));
        map.put("publishingType", ConstantFactory.me().getDictsByName("广告发布类型", Integer.parseInt(map.get("publishingType").toString())));
        map.put("status", ConstantFactory.me().getDictsByName("广告状态", Integer.parseInt(map.get("status").toString())));
        map.put("coverUrl", Consts.DOMAIN+map.get("coverUrl"));
//        map.put("rewardType", ConstantFactory.me().getDictsByName("广告赏金发放规则", Integer.parseInt(map.get("rewardType").toString())));
//        map.put("screenGender", ConstantFactory.me().getDictsByName("性别", Integer.parseInt(map.get("screenGender").toString())));
    }

}
